package chances.epg.ui.taglib.model;

public enum AlignEnum {

	LEFT("left"), RIGHT("right"), CENTER("center"),
	TOP("top"), BOTTOM("bottom"), MIDDLE("middle"),UNKNOW("unkown");
	private String name;

	public String getName() {
		return this.name;
	}

	private AlignEnum(String name) {
		this.name = name;
	}
	public static AlignEnum findAlign( String name){
		if(LEFT.name.equals(name)){
			return LEFT;
		}else if(RIGHT.name.equals(name)){
			return RIGHT;
		}else if(CENTER.name.equals(name)){
			return CENTER;
		}else{
			return UNKNOW;
		}
	}
	
	public static AlignEnum findValign( String name){
		if(TOP.name.equals(name)){
			return TOP;
		}else if(BOTTOM.name.equals(name)){
			return BOTTOM;
		}else if(MIDDLE.name.equals(name)){
			return MIDDLE;
		}else{
			return UNKNOW;
		}
	}
}
